package chapter06

import scala.beans.BeanProperty

object Test03_Class {

  def main(args: Array[String]): Unit = {
      val student = new Student()

      println(student.getAge)
      println(student.sex)
  }

}

// 定义一个类 ,，默认是public
class Student{
  // 定义属性 默认是public
  private var name:String = "pop"
  // 创建对于的set get 方法
  @BeanProperty
  val age:Int = 18
  // 默认给一个空值
  var sex:String = _
}
